import {GameFrameworkEventArgs} from "../Base/GameFrameworkEventArgs";
import {ReferencePool} from "../Base/ReferencePool/ReferencePool";

export class WebRequestAgentHelperErrorEventArgs extends GameFrameworkEventArgs{

    public static Create(errorMessage:string):WebRequestAgentHelperErrorEventArgs{
        let webRequestAgentHelperErrorEventArgs:WebRequestAgentHelperErrorEventArgs = ReferencePool.Acquire(WebRequestAgentHelperErrorEventArgs);
        webRequestAgentHelperErrorEventArgs._errorMessage = errorMessage;
        return webRequestAgentHelperErrorEventArgs;
    }

    get errorMessage(): string {
        return this._errorMessage;
    }

    private _errorMessage:string;

    constructor() {
        super();
        this._errorMessage = null;
    }


    Clear(): void {
        this._errorMessage = null;
    }

}